export default defineNuxtRouteMiddleware((to, from) => {
  // console.log(to,from)
  if (import.meta.client) {
    const token = userStore().getToken()
    const loginPath = ['/multi_enterprise', '/merchant', 'open']
    if (loginPath.includes(to.path) && !token) {
      return location.href = '/'
    }
  }
})


